
<?php echo $this->Form->create('Uploadings',array('controller'=>'Uploading','action'=>'index','type'=>'file'));?>
   <label for="file">Upload File:</label>
   <input type="file" name="file" id="file"><br>
   <input type="submit" name="upload" value="Upload">
<?php echo $this->Form->end();?>
<div style="margin-top:15px">
<?php 
	if(!empty($all_banners[0]['Uploading']['name']) && file_exists(WWW_ROOT.'img/banner/'.$all_banners[0]['Uploading']['name']))
	{
		foreach($all_banners as $key=>$val)
		{
	    ?>
			<div style="width:200px; height:auto; float:left; margin-left:10px">
                <?php 
				    echo $this->Html->image('banner/'.$val['Uploading']['name']);
					echo $this->Html->link('Delete',array('controller'=>'Uploadings','action'=>'delete',$val['Uploading']['id']),array('class'=>'btn','style'=>'margin-top:10px'));
				?>
            </div>
		<?php 
		}
	}
?>
</div>